{{define "Littlewin/article.html"}}
<!DOCTYPE html>
<html>
<head>
    {{template "head/head" .}}
    {{template "head/3rdstatistic" .}}
    {{template "head/article" .}}
</head>
<body{{if .ToC}} class="body--side"{{end}}>
{{template "Littlewin/header" .}}
<div class="fn__flex-1">
    <div class="wrapper fn__flex header__meta">
        <div class="main" id="pjax">
        {{if .pjax}}{{noescape "<!---- pjax {#pjax} start ---->"}}{{end}}
            {{template "Littlewin/nav" .}}
            <article class="module module--bottom post__content">
                <h2 class="post__title">
                    {{if .Article.Topped}}
                    <span aria-label="{{$.I18n.Top}}" class="pipe-tooltipped pipe-tooltipped--n">
                        <svg>
                            <use xlink:href="#focus"></use>
                        </svg>
                    </span>
                    {{end}}
                    {{.Article.Title}}
                </h2>
                <div class="vditor-reset" id="articleContent" data-author="{{.Article.Author.Name}}">
                    {{.Article.Content}}
                </div>
            </article>
            <div class="module module--space module--bottom post__share fn__clear">
                <span data-type="wechat" class="post__share--wechat">
                    <svg><use xlink:href="#wechat"></use></svg>
                </span>
                <span data-type="weibo" class="post__share--weibo">
                    <svg><use xlink:href="#weibo"></use></svg>
                </span>
                <span data-type="twitter" class="post__share--twitter">
                    <svg><use xlink:href="#twitter"></use></svg>
                </span>
                <span data-type="qqz" class="post__share--qqz">
                    <svg><use xlink:href="#iconQQZ"></use></svg>
                </span>
                <div class="post__code"
                     data-title="{{.Article.Title}}"
                     data-blogtitle="{{$.Setting.BasicBlogTitle}}"
                     data-url="{{.Article.URL}}"
                     data-avatar="{{.Article.Author.AvatarURLWithSize 128}}"></div>
                {{if .Article.Editable}}
                <a href="{{$.Conf.Server}}/admin/articles/post?id={{.Article.ID}}" class="fn__right fn__flex-center">
                    &nbsp;&nbsp;&nbsp;
                    <svg><use xlink:href="#iconEdit"></use></svg>&nbsp;{{.I18n.Edit}}
                </a>
                {{end}}
                {{if $.Commentable}}
                <span class="fn__right fn__flex-center"
                      data-title="{{.I18n.Comment}}{{.I18n.Colon}}{{.Article.Title}}"
                      id="articleCommentBtn"
                      data-id="{{.Article.ID}}">
                    <svg>
                        <use xlink:href="#iconComment"></use>
                    </svg>&nbsp;{{.I18n.Comment}}
                </span>
                {{end}}
            </div>
            <div class="module module--space module--bottom post__meta">
                本文由 <a rel="nofollow" href="{{.Article.Author.URL}}">{{.Article.Author.Name}}</a> 于 {{.Article.CreatedAt}}
                发布，当前已被围观 
                <a href="{{.Article.URL}}"><span data-uvstaturl="{{.Article.URL}}">{{.Article.ViewCount}}</span></a> 次{{if $.Commentable}}，评论
                <a href="{{.Article.URL}}#b3logPipeComments" data-uvstatcmt="{{.Article.ID}}">{{.Article.CommentCount}}</a> 次{{end}}
                <br>

                并被添加
                {{range .Article.Tags}}「<a class="tag" rel="tag" href="{{.URL}}">{{.Title}}</a>」{{end}}
                标签

                {{if .PreviousArticle}}
                <br>
                {{.I18n.PreArticle}}
                <a href="{{.PreviousArticle.URL}}"
                   rel="prev">
                   {{.PreviousArticle.Title}}
                </a>
                {{end}}

                {{if .NextArticle}}
                <br>
                {{.I18n.NextArticle}}
                <a href="{{.NextArticle.URL}}" rel="next">
                    {{.NextArticle.Title}}
                </a>
                {{end}}
            </div>

            {{template "Littlewin/module-list" dict "List" .RecommendArticles "Title" .I18n.RecommendArticle "UserCount" .UserCount}}

            <div class="module module--bottom module--space" id="b3logPipeComments">
                {{if .Commentable}}
                <div id="vcomment" style="padding-top: 6px"
                     data-name="{{.Article.Author.Name}}"
                     data-postId="{{.Article.ID}}"></div>
                {{template "comment/comments" .}}
                {{end}}
            </div>
        {{if .pjax}}{{noescape "<!---- pjax {#pjax} end ---->"}}{{end}}
        </div>
        {{template "Littlewin/side" .}}

        {{template "comment/editor" .}}
    </div>
</div>
{{template "Littlewin/footer" .}}
</body>
</html>
{{end}}
